<%--
  Created by IntelliJ IDEA.
  User: Sakura
  Date: 2023/8/8
  Time: 20:00
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
  <meta name="renderer" content="webkit">
  <title>招聘要求</title>
  <link rel="stylesheet" href="${pageContext.servletContext.contextPath}/css/pintuer.css">
  <link rel="stylesheet" href="${pageContext.servletContext.contextPath}/css/admin.css">
  <script src="${pageContext.servletContext.contextPath}/js/jquery.js"></script>
  <script src="${pageContext.servletContext.contextPath}/js/pintuer.js"></script>
</head>
<body>
<form method="post" action="">
  <div class="panel admin-panel">
    <div class="panel-head"><strong class="icon-reorder"> 用户管理</strong></div>
    <div class="padding border-bottom">
      <ul class="search">
        <li>
          <a class="button border-green" href="${pageContext.servletContext.contextPath}/interviewplan/toAddUI/${interviewplan.id}">新增</a>
  </li>
      </ul>
    </div>
    <table class="table table-hover text-center">
      <tr>
        <th width="120">ID</th>
        <th>候选人姓名</th>
        <th>候选人电话</th>
        <th>面试时间</th>
        <th>面试官</th>
        <th>面试结果</th>
        <th>创建时间</th>
        <th>操作</th>
      </tr>
      <c:forEach items="${interviewplanlist}" var="interviewplan">
        <tr>
          <td><input type="checkbox" name="id[]" value="1"/>
              ${interviewplan.id}
          </td>
          <td>${interviewplan.name}</td>
          <td>${interviewplan.phone}</td>
          <td><fmt:formatDate value="${interviewplan.interviewTime}" pattern="yyyy-MM-dd HH:mm"/></td>
          <c:forEach items="${sysemployeeList}" var="sysemployee">
            <c:if test="${sysemployee.id==interviewplan.interviewerId}">
              <td>${sysemployee.name}</td>
            </c:if>
          </c:forEach>
          <c:if test="${interviewplan.result==0}">
            <td>待面试</td>
          </c:if>
          <c:if test="${interviewplan.result==1}">
            <td>面试中</td>
          </c:if>
          <c:if test="${interviewplan.result==2}">
            <td>通过</td>
          </c:if>
          <c:if test="${interviewplan.result==3}">
            <td>未通过</td>
          </c:if>
            <%--时间格式化回显--%>
          <td><fmt:formatDate value="${interviewplan.created}" pattern="yyyy-MM-dd HH:mm"/></td>
          <td>
            <div class="button-group">
              <a class="button border-green" href="${pageContext.servletContext.contextPath}/interviewplan/toUpdateUI/${interviewplan.id}">修改</a>
              <a class="button border-green" href="${pageContext.servletContext.contextPath}/interviewplan/delete/${interviewplan.id}">删除</a>
            </div>
          </td>
        </tr>
      </c:forEach>
      <tr>
        <td colspan="8">
          <div class="pagelist"><a href="">上一页</a> <span class="current">1</span><a href="">2</a><a
                  href="">3</a><a href="">下一页</a><a href="">尾页</a></div>
        </td>
      </tr>
    </table>
  </div>
</form>
<script type="text/javascript">

  function del(id) {
    if (confirm("您确定要删除吗?")) {

    }
  }

  $("#checkall").click(function () {
    $("input[name='id[]']").each(function () {
      if (this.checked) {
        this.checked = false;
      } else {
        this.checked = true;
      }
    });
  })

  function DelSelect() {
    var Checkbox = false;
    $("input[name='id[]']").each(function () {
      if (this.checked == true) {
        Checkbox = true;
      }
    });
    if (Checkbox) {
      var t = confirm("您确认要删除选中的内容吗？");
      if (t == false) return false;
    } else {
      alert("请选择您要删除的内容!");
      return false;
    }
  }

</script>
</body>
</html>